#include "esprite.h"
#include "../resources/etexture.h"

ESprite::ESprite()
{
    m_fAngle = 0.0f;
    m_scale = QPointF(1.0f, 1.0f);
    m_fAlpha = 1.0f;
    m_color = QColor(255, 255, 255);
}

void ESprite::setPos(QPointF pos)
{
    m_pos = pos;
}

void ESprite::setPos(float x, float y)
{
    m_pos = QPointF(x, y);
}

QPointF ESprite::pos() const
{
    return m_pos;
}

void ESprite::setAngle(float angle)
{
    m_fAngle = angle;
}

float ESprite::angle() const
{
    return m_fAngle;
}

void ESprite::setScale(QPointF scale)
{
    m_scale = scale;
}

void ESprite::setScale(float x, float y)
{
    m_scale = QPointF(x, y);
}

QPointF ESprite::scale() const
{
    return m_scale;
}

void ESprite::setColor(QColor color)
{
    m_color = color;
}

void ESprite::setColor(int r, int g, int b)
{
    m_color = QColor(r, g, b);
}

QColor ESprite::color() const
{
    return m_color;
}

void ESprite::setAlpha(float alpha)
{
    m_fAlpha = alpha;
}

float ESprite::alpha() const
{
    return m_fAlpha;
}

void ESprite::setPivot(QPointF pivot)
{
    m_pivot = pivot;
}

void ESprite::setPivot(float x, float y)
{
    m_pivot = QPointF(x, y);
}

QPointF ESprite::pivot() const
{
    return m_pivot;
}
